package com.yan;

import java.util.Arrays;

public class Copyof {
    public static void main(String[] args) {
        int[] a = {1,2,3,4,5};
        int[] b = {5,4,3,2,1};
        //a = Arrays.copyOf(b , a.length * 2);
        System.out.println(Arrays.toString(a));
        System.out.println(Arrays.toString(b));
        System.out.println("---------------------------");
        System.arraycopy(a , 3 , a , 2 , 2);
        System.out.println(Arrays.toString(a));
    }
}
